import { createBrowserRouter } from "react-router-dom";
import Home from "../views/Home/Home";
import Home2 from "../views/Home2/Home2";
import Set from '../views/Set/Set'
import Chuan from "../views/Chuan/Chuan";
import Chuan2 from "../views/Chuan2/Chuan2";
import Xin from "../views/Xin/Xin";
import Xin2 from "../views/Xin2/Xin2";
import { App } from "antd";
export const Myrouter = [
    {
        key:"/home3",
        label:"二级菜单",
        children:[
            {
                key:"/home2",
                path:"/home2",
                label:"首页",
                element:<Home2></Home2>
            },
            {
                key:'/set',
                path:"/set",
                label:"设置",
                element:<Set></Set>
            }
        ]
    },
    {
        key:"/chuan",
        path:"/chuan",
        label:"路由传参",
        element:<Chuan></Chuan>
    },
    
    {
        key:"/chuan2",
        path:"/chuan2",
        label:"路由传参2",
        element:<Chuan2></Chuan2>
    },
   
]
const routers = [
  {
    path: "/",
    label:"首页",
    element: <Home></Home>,
    children:Myrouter
  },
];
export const router = createBrowserRouter(routers);
export default router;
